2020-2021 Sunseeker Telemetry and Lighting System
usci_a_uart_ex1_loopbackAdvance.c File Reference
#include "driverlib.h"

Go to the source code of this file.

Macros

#define BAUD_RATE   9600
 

Functions

void main (void)
 
void USCI_A0_ISR (void)
 

Variables

uint8_t receivedData = 0x00
 
uint8_t transmitData = 0x00
 
uint8_t check = 0
 

Macro Definition Documentation

◆ BAUD_RATE

#define BAUD_RATE   9600

This example shows how to configure the UART module as the loopback to verify that received data is sent data.

          MSP430F5438A
        -----------------
  RST -|     P3.4/UCA0TXD|----|
       |                 |    |
       |                 |    |
       |     P3.5/UCA0RXD|----|
       |                 |

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

  • UART peripheral
  • GPIO Port peripheral (for UART pins)
  • UCA0TXD
  • UCA0RXD

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

  • USCI_A0_VECTOR.

Definition at line 64 of file usci_a_uart_ex1_loopbackAdvance.c.

Function Documentation

◆ main()

void main ( void  )

Definition at line 80 of file usci_a_uart_ex1_loopbackAdvance.c.

References check, param, STATUS_FAIL, and transmitData.

◆ USCI_A0_ISR()

void USCI_A0_ISR ( void  )

Definition at line 141 of file usci_a_uart_ex1_loopbackAdvance.c.

References check, receivedData, and transmitData.

Variable Documentation

◆ check

uint8_t check = 0

Definition at line 78 of file usci_a_uart_ex1_loopbackAdvance.c.

Referenced by main(), and USCI_A0_ISR().

◆ receivedData

uint8_t receivedData = 0x00

Definition at line 70 of file usci_a_uart_ex1_loopbackAdvance.c.

Referenced by USCI_A0_ISR().

◆ transmitData

uint8_t transmitData = 0x00

Definition at line 76 of file usci_a_uart_ex1_loopbackAdvance.c.

Referenced by main(), and USCI_A0_ISR().